<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 多维数组： 数组里包含数组；
        var arr = [1,2,3,4];
        var arr2 = [1,2,3,[4,5],[6,7]];
        var arr3 = [1,2,[3,[4,5]],6];

        // 一个数组 ["*","*","*","*"];

        var arrContainer = [];

        for (var j = 0; j < 3; j++) {
            var arr = [];
            for (var i = 0; i < 5; i++) {
                arr.push("*")
            }
            console.log(arr);

            arrContainer.push(arr);
        }



        var arr = [];
        for(var i=0;i<5;i++){
            arr.push("*")
        }
        console.log(arr);
        arrContainer.push(arr);

        var arr = [];
        for(var i=0;i<5;i++){
            arr.push("*")
        }
        console.log(arr);
        arrContainer.push(arr);

        console.log(arrContainer);


        var arr = [["张三","李四"],["王五","王小二"],["王健林","许家印"]];
        for(var i=0;i<arr.length;i++){
            // console.log(arr[i]);
            for(var j=0;j<arr[i].length;j++){
                console.log(arr[i][j]);
            }
        }




        // 对象数组； 数组里是对象；
        var arr2113 = [{name:"张三",age:20},{name:"李四",age:21},{name:"王五",age:22}];

        // 数组对象
        var obj = {
            one:[1,2,3,4],
            two:[4,5,6,7]
        }
        for(var i=0;i<arr2113.length;i++){
            // console.log("名字是"+arr2113[i].name+"年龄是"+arr2113[i].age);
            document.write("<p>"+"名字是"+arr2113[i].name+"年龄是"+arr2113[i].age+"</p>");
        }


    </script>
</body>

</html>